home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / ASDebugging.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  7.4 KB  |  307 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ASDebugging.a
  3. ;
  4. ;    Contains:    AppleScript Debugging Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__ASDEBUGGING__') = 'UNDEFINED' THEN
  21. __ASDEBUGGING__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  25.     include 'AppleEvents.a'
  26.     ENDIF
  27. ;        include 'Errors.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Types.a'                                            ;
  30. ;        include 'Memory.a'                                            ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'Quickdraw.a'                                    ;
  35. ;                include 'QuickdrawText.a'                            ;
  36. ;        include 'EPPC.a'                                            ;
  37. ;            include 'AppleTalk.a'                                    ;
  38. ;            include 'Files.a'                                        ;
  39. ;                include 'Finder.a'                                    ;
  40. ;            include 'PPCToolbox.a'                                    ;
  41. ;            include 'Processes.a'                                    ;
  42. ;        include 'Notification.a'                                    ;
  43.  
  44.     IF &TYPE('__APPLESCRIPT__') = 'UNDEFINED' THEN
  45.     include 'AppleScript.a'
  46.     ENDIF
  47. ;        include 'OSA.a'                                            ;
  48. ;            include 'AEObjects.a'                                    ;
  49. ;            include 'Components.a'                                    ;
  50. ;        include 'TextEdit.a'                                        ;
  51.  
  52. ;     This mode flag can be passed to OSASetProperty or OSASetHandler
  53. ;        and will prevent properties or handlers from being defined in a context
  54. ;        that doesn't already have bindings for them. An error is returned if
  55. ;        a current binding doesn't already exist. 
  56. kOSAModeDontDefine                EQU        $0001
  57.  
  58. ;*************************************************************************
  59. ;    Component Selectors
  60. ;*************************************************************************
  61. kASSelectSetPropertyObsolete    EQU        $1101
  62. kASSelectGetPropertyObsolete    EQU        $1101
  63. kASSelectSetHandlerObsolete        EQU        $1103
  64. kASSelectGetHandlerObsolete        EQU        $1104
  65. kASSelectGetAppTerminologyObsolete EQU        $1105
  66. kASSelectSetProperty            EQU        $1106
  67. kASSelectGetProperty            EQU        $1107
  68. kASSelectSetHandler                EQU        $1108
  69. kASSelectGetHandler                EQU        $1109
  70. kASSelectGetAppTerminology        EQU        $110A
  71. kASSelectGetSysTerminology        EQU        $110B
  72. kASSelectGetPropertyNames        EQU        $110C
  73. kASSelectGetHandlerNames        EQU        $110D
  74.  
  75. ;*************************************************************************
  76. ;    Context Accessors
  77. ;*************************************************************************
  78. ;
  79. ; pascal OSAError OSASetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  80. ;
  81.     IF ¬ GENERATINGCFM THEN
  82.         Macro
  83.         _OSASetProperty
  84.             dc.w     $2F3C
  85.             dc.w     $0010
  86.             dc.w     $1106
  87.             moveq    #0,d0
  88.             dc.w     $A82A
  89.         EndM
  90.     ELSE
  91.         IMPORT_CFM_FUNCTION    OSASetProperty
  92.     ENDIF
  93.  
  94. ;
  95. ; pascal OSAError OSAGetProperty(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  96. ;
  97.     IF ¬ GENERATINGCFM THEN
  98.         Macro
  99.         _OSAGetProperty
  100.             dc.w     $2F3C
  101.             dc.w     $0010
  102.             dc.w     $1107
  103.             moveq    #0,d0
  104.             dc.w     $A82A
  105.         EndM
  106.     ELSE
  107.         IMPORT_CFM_FUNCTION    OSAGetProperty
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal OSAError OSAGetPropertyNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingPropertyNames)
  112. ;
  113.     IF ¬ GENERATINGCFM THEN
  114.         Macro
  115.         _OSAGetPropertyNames
  116.             dc.w     $2F3C
  117.             dc.w     $000C
  118.             dc.w     $110C
  119.             moveq    #0,d0
  120.             dc.w     $A82A
  121.         EndM
  122.     ELSE
  123.         IMPORT_CFM_FUNCTION    OSAGetPropertyNames
  124.     ENDIF
  125.  
  126. ;
  127. ; pascal OSAError OSASetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  128. ;
  129.     IF ¬ GENERATINGCFM THEN
  130.         Macro
  131.         _OSASetHandler
  132.             dc.w     $2F3C
  133.             dc.w     $0010
  134.             dc.w     $1108
  135.             moveq    #0,d0
  136.             dc.w     $A82A
  137.         EndM
  138.     ELSE
  139.         IMPORT_CFM_FUNCTION    OSASetHandler
  140.     ENDIF
  141.  
  142. ;
  143. ; pascal OSAError OSAGetHandler(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  144. ;
  145.     IF ¬ GENERATINGCFM THEN
  146.         Macro
  147.         _OSAGetHandler
  148.             dc.w     $2F3C
  149.             dc.w     $0010
  150.             dc.w     $1109
  151.             moveq    #0,d0
  152.             dc.w     $A82A
  153.         EndM
  154.     ELSE
  155.         IMPORT_CFM_FUNCTION    OSAGetHandler
  156.     ENDIF
  157.  
  158. ;
  159. ; pascal OSAError OSAGetHandlerNames(ComponentInstance scriptingComponent, long modeFlags, OSAID contextID, AEDescList *resultingHandlerNames)
  160. ;
  161.     IF ¬ GENERATINGCFM THEN
  162.         Macro
  163.         _OSAGetHandlerNames
  164.             dc.w     $2F3C
  165.             dc.w     $000C
  166.             dc.w     $110D
  167.             moveq    #0,d0
  168.             dc.w     $A82A
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION    OSAGetHandlerNames
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal OSAError OSAGetAppTerminology(ComponentInstance scriptingComponent, long modeFlags, FSSpec *fileSpec, short terminologyID, Boolean *didLaunch, AEDesc *terminologyList)
  176. ;
  177.     IF ¬ GENERATINGCFM THEN
  178.         Macro
  179.         _OSAGetAppTerminology
  180.             dc.w     $2F3C
  181.             dc.w     $0012
  182.             dc.w     $110A
  183.             moveq    #0,d0
  184.             dc.w     $A82A
  185.         EndM
  186.     ELSE
  187.         IMPORT_CFM_FUNCTION    OSAGetAppTerminology
  188.     ENDIF
  189.  
  190. ; Errors:
  191. ;       errOSASystemError        operation failed
  192. ;    
  193. ;
  194. ; pascal OSAError OSAGetSysTerminology(ComponentInstance scriptingComponent, long modeFlags, short terminologyID, AEDesc *terminologyList)
  195. ;
  196.     IF ¬ GENERATINGCFM THEN
  197.         Macro
  198.         _OSAGetSysTerminology
  199.             dc.w     $2F3C
  200.             dc.w     $000A
  201.             dc.w     $110B
  202.             moveq    #0,d0
  203.             dc.w     $A82A
  204.         EndM
  205.     ELSE
  206.         IMPORT_CFM_FUNCTION    OSAGetSysTerminology
  207.     ENDIF
  208.  
  209. ; Errors:
  210. ;       errOSASystemError        operation failed
  211. ;    
  212. ; Notes on terminology ID
  213. ;
  214. ;    A terminology ID is derived from script code and language code
  215. ;    as follows;
  216. ;
  217. ;        terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
  218. ;
  219. ;*************************************************************************
  220. ;    Obsolete versions provided for backward compatibility:
  221. ;
  222. ;
  223. ; pascal OSAError ASSetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID scriptValueID)
  224. ;
  225.     IF ¬ GENERATINGCFM THEN
  226.         Macro
  227.         _ASSetProperty
  228.             dc.w     $2F3C
  229.             dc.w     $000C
  230.             dc.w     $1101
  231.             moveq    #0,d0
  232.             dc.w     $A82A
  233.         EndM
  234.     ELSE
  235.         IMPORT_CFM_FUNCTION    ASSetProperty
  236.     ENDIF
  237.  
  238. ;
  239. ; pascal OSAError ASGetProperty(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *variableName, OSAID *resultingScriptValueID)
  240. ;
  241.     IF ¬ GENERATINGCFM THEN
  242.         Macro
  243.         _ASGetProperty
  244.             dc.w     $2F3C
  245.             dc.w     $000C
  246.             dc.w     $1101
  247.             moveq    #0,d0
  248.             dc.w     $A82A
  249.         EndM
  250.     ELSE
  251.         IMPORT_CFM_FUNCTION    ASGetProperty
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal OSAError ASSetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID compiledScriptID)
  256. ;
  257.     IF ¬ GENERATINGCFM THEN
  258.         Macro
  259.         _ASSetHandler
  260.             dc.w     $2F3C
  261.             dc.w     $000C
  262.             dc.w     $1103
  263.             moveq    #0,d0
  264.             dc.w     $A82A
  265.         EndM
  266.     ELSE
  267.         IMPORT_CFM_FUNCTION    ASSetHandler
  268.     ENDIF
  269.  
  270. ;
  271. ; pascal OSAError ASGetHandler(ComponentInstance scriptingComponent, OSAID contextID, const AEDesc *handlerName, OSAID *resultingCompiledScriptID)
  272. ;
  273.     IF ¬ GENERATINGCFM THEN
  274.         Macro
  275.         _ASGetHandler
  276.             dc.w     $2F3C
  277.             dc.w     $000C
  278.             dc.w     $1104
  279.             moveq    #0,d0
  280.             dc.w     $A82A
  281.         EndM
  282.     ELSE
  283.         IMPORT_CFM_FUNCTION    ASGetHandler
  284.     ENDIF
  285.  
  286. ;
  287. ; pascal OSAError ASGetAppTerminology(ComponentInstance scriptingComponent, FSSpec *fileSpec, short terminologID, Boolean *didLaunch, AEDesc *terminologyList)
  288. ;
  289.     IF ¬ GENERATINGCFM THEN
  290.         Macro
  291.         _ASGetAppTerminology
  292.             dc.w     $2F3C
  293.             dc.w     $000E
  294.             dc.w     $1105
  295.             moveq    #0,d0
  296.             dc.w     $A82A
  297.         EndM
  298.     ELSE
  299.         IMPORT_CFM_FUNCTION    ASGetAppTerminology
  300.     ENDIF
  301.  
  302. ; Errors:
  303. ;        errOSASystemError        operation failed
  304. ;    
  305. ;************************************************************************
  306.     ENDIF ; __ASDEBUGGING__
  307.